package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Setmeal;
import com.sky.enumeration.OperationType;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName: SetmealMapper.xml
 * Package: com.sky.mapper
 * Description:
 *
 * @Author: Zhang Peiyuan
 * @Create: 2024-12-18-12:19
 * @Version: v1.0
 */
@Mapper
public interface SetmealMapper {
    int slelctCountByCategoryId(Long categoryId);
    @AutoFill(OperationType.INSERT)
    void insert(Setmeal setmeal);

    Page<SetmealVO> selectPage(SetmealPageQueryDTO setmealPageQueryDTO);

    Setmeal getById(Long id);

    void deleteById(Long setmealId);

    @AutoFill(OperationType.UPDATE)
    void update(Setmeal setmeal);

    List<Setmeal> selectListByCategoryId(Long categoryId);
}
